package com.skydonkey.es;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Document(indexName = "video")
public class Video {

    @Id
    private Long videoId;

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String title;

    public Long getVideoId() {
        return videoId;
    }

    public Video setVideoId(Long videoId) {
        this.videoId = videoId;
        return this;
    }

    public String getTitle() {
        return title;
    }

    public Video setTitle(String title) {
        this.title = title;
        return this;
    }

    @Override
    public String toString() {
        return "Video{" +
                "videoId=" + videoId +
                ", title='" + title + '\'' +
                '}';
    }
}
